package com.yun.fullstack.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NonNull;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 祝福信息表
 * </p>
 *
 * @author XiaoWenzhuo
 * @since 2022-04-26
 */
@Data
@TableName("message")
@ApiModel(value = "Message对象", description = "祝福信息表")
public class Message implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("用户唯一标识")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @NotBlank(message = "用户姓名不能为空")
    @ApiModelProperty(value = "用户姓名",required = true)
    @TableField("user_name")
    private String userName;


    @ApiModelProperty(value = "用户地点")
    @TableField("place")
    private String place;

    @NotBlank(message = "祝福内容不能为空")
    @ApiModelProperty(value = "祝福内容",required = true)
    @TableField("content")
    private String content;



    @ApiModelProperty(value = "头像地址",required = false)
    @TableField("avatar")
    private String avatar;

    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @ApiModelProperty("祝福创建时间")
    @TableField("create_time")
    private LocalDateTime createTime;


}




